{extend name='layout/main' /}

{block name='main'}
<div class="title">交易查询 > 持仓信息查询</div>

<div class="filter">
    <form action="/trade/hold/" method="get" id="filter_form">
        <span>客户名称：<input type="text" name="user"  value="{$user}"></span>
        <span>交易账号：<input type="text" name="account"  value="{$account}"></span>
        <span><input type="submit" value="查询"></span>
    </form>
</div>

<div class="table data_table">
    <table id="userlist">
        <tr>
            <th>编号</th>
            <th width="120">交易账号</th>
            <th>姓名</th>
            <th width="120">用户名</th>
            <th>商品名称</th>
            <th>买卖类型</th>
            <th>持仓量</th>
            <th>持仓均价</th>
            <th>占用保证金</th>
        </tr>
        {if $list}
        {foreach $list as $key=>$it}
        <tr>
            <td>{$it.id}</td>
            <td>{$it.account}</td>
            <td>{$it.custom_name}</td>
            <td>{$it.user_name}</td>
            <td>{$it.goods}</td>
            <td>{if $it.type eq 'B'}买{else}卖{/if}</td>
            <td>{$it.num}</td>
            <td>{$it.price}</td>
            <td>{$it.bail_value}</td>
        </tr>
        {/foreach}
        {/if}
    </table>
</div>
{if $list}
<div class="page">
    {$list->render()} <div class="page_record">共<strong>{$list->total()}</strong>条数据，每页显示：<strong>{$list->listRows()}</strong>条记录</div>
</div>
{/if}

{/block}

